import fs from "fs";
import path from "path";

/**
 *
 * @returns 返回监听的目录
 * 这个例子中返回的是 src/assets 目录
 */
export function getWatchDir() {
  const dir = path.join(process.cwd(), "src", "assets");
  if (!fs.existsSync(dir)) {
    fs.mkdirSync(dir, { recursive: true });
  }
  return dir;
}
